﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"          
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 	
	xmlns:common="clr-namespace:Oxage.Common;assembly=Oxage.Rasterizer.Control">
	<common:VisibilityConverter x:Key="VisibilityConverter" />

	<Style x:Key="HeaderTextStyle" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="White" />
		<Setter Property="FontWeight" Value="Bold" />
		<Setter Property="Margin" Value="2,0,0,4" />
	</Style>

	<Style x:Key="OrientationRadioButtonStyle" TargetType="{x:Type RadioButton}">
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Background" Value="Blue"/>
		<Setter Property="BorderBrush" Value="Green"/>
		<Setter Property="BorderThickness" Value="2"/>
		<Setter Property="Padding" Value="0"/>
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RadioButton}">
					<ControlTemplate.Triggers>
						<Trigger Property="HasContent" Value="true"/>
						<Trigger Property="IsEnabled" Value="false"/>
					</ControlTemplate.Triggers>
					<Grid x:Name="RootElement">
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>

						<Grid DataContext="{TemplateBinding IsMouseOver}">
							<!-- MouseOver state -->
							<Border BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Visibility="{Binding Converter={StaticResource VisibilityConverter}}" />
						</Grid>

						<Grid DataContext="{TemplateBinding IsPressed}">
							<!-- Pressed state -->
							<Border BorderBrush="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Visibility="{Binding Converter={StaticResource VisibilityConverter}}" />
						</Grid>

						<Grid DataContext="{TemplateBinding IsChecked}">
							<!-- Selected state -->
							<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" Visibility="{Binding Converter={StaticResource VisibilityConverter}}" />
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>